100
How do I enable the cross link support ( rectangular )

with AxSurface1 do
begin
	with Elements do
	begin
		Add('Element <sha ;;0>A',Nil,Nil);
		Add('Element <sha ;;0>B',TObject(0),TObject(76));
		with Add('Element <sha ;;0>C',TObject(-76),TObject(32)) do
		begin
			AutoSize := False;
			Height := 32;
		end;
		with Add('Element <sha ;;0>D',TObject(76),TObject(32)) do
		begin
			AutoSize := False;
			Height := 32;
		end;
	end;
	with Links do
	begin
		with Add(AxSurface1.Elements.Item[TObject(1)],AxSurface1.Elements.Item[TObject(2)],Nil) do
		begin
			StartPos := EXSURFACELib.AlignmentEnum.CenterAlignment;
			EndPos := EXSURFACELib.AlignmentEnum.CenterAlignment;
		end;
		with Add(AxSurface1.Elements.Item[TObject(2)],AxSurface1.Elements.Item[TObject(1)],Nil) do
		begin
			StartPos := EXSURFACELib.AlignmentEnum.CenterAlignment;
			EndPos := EXSURFACELib.AlignmentEnum.CenterAlignment;
		end;
		Add(AxSurface1.Elements.Item[TObject(3)],AxSurface1.Elements.Item[TObject(4)],Nil);
		with Add(AxSurface1.Elements.Item[TObject(4)],AxSurface1.Elements.Item[TObject(3)],Nil) do
		begin
			StartPos := EXSURFACELib.AlignmentEnum.LeftAlignment;
			EndPos := EXSURFACELib.AlignmentEnum.RightAlignment;
		end;
	end;
	ShowLinks := Integer(EXSURFACELib.ShowExtendedLinksEnum.exShowCrossLinksRect) Or Integer(EXSURFACELib.ShowExtendedLinksEnum.exShowExtendedLinks);
end
99
How do I show a link frmo bottom to top, or reverse, not from left to right

with AxSurface1 do
begin
	with Elements do
	begin
		Add('Element <sha ;;0>A',Nil,Nil);
		Add('Element <sha ;;0>B',TObject(0),TObject(64));
	end;
	with Links do
	begin
		with Add(AxSurface1.Elements.Item[TObject(1)],AxSurface1.Elements.Item[TObject(2)],Nil) do
		begin
			StartPos := EXSURFACELib.AlignmentEnum.CenterAlignment;
			EndPos := EXSURFACELib.AlignmentEnum.CenterAlignment;
		end;
	end;
end
98
What options to align the elements do I have if I use Arrange method

with AxSurface1 do
begin
	BeginUpdate();
	ShowGridLines := True;
	with Elements do
	begin
		h1 := Add('Top Alignment',Nil,Nil).ID;
		Add('Element',Nil,Nil);
		Add('Element',Nil,Nil);
		Add('Element',Nil,Nil);
		h2 := Add('Center Alignment',Nil,TObject(96)).ID;
		Add('Element',Nil,TObject(96));
		Add('Element',Nil,TObject(96));
		Add('Element',Nil,TObject(96));
		h3 := Add('Bottom Alignment',Nil,TObject(178)).ID;
		Add('Element',Nil,TObject(192));
		Add('Element',Nil,TObject(192));
		Add('Element',Nil,TObject(192));
	end;
	with Links do
	begin
		Add(AxSurface1.Elements.Item[TObject(1)],AxSurface1.Elements.Item[TObject(2)],Nil);
		Add(AxSurface1.Elements.Item[TObject(1)],AxSurface1.Elements.Item[TObject(3)],Nil);
		Add(AxSurface1.Elements.Item[TObject(2)],AxSurface1.Elements.Item[TObject(4)],Nil);
		Add(AxSurface1.Elements.Item[TObject(2)],AxSurface1.Elements.Item[TObject(3)],Nil);
		Add(AxSurface1.Elements.Item[TObject(5)],AxSurface1.Elements.Item[TObject(6)],Nil);
		Add(AxSurface1.Elements.Item[TObject(5)],AxSurface1.Elements.Item[TObject(7)],Nil);
		Add(AxSurface1.Elements.Item[TObject(6)],AxSurface1.Elements.Item[TObject(8)],Nil);
		Add(AxSurface1.Elements.Item[TObject(6)],AxSurface1.Elements.Item[TObject(7)],Nil);
		Add(AxSurface1.Elements.Item[TObject(9)],AxSurface1.Elements.Item[TObject(10)],Nil);
		Add(AxSurface1.Elements.Item[TObject(9)],AxSurface1.Elements.Item[TObject(11)],Nil);
		Add(AxSurface1.Elements.Item[TObject(10)],AxSurface1.Elements.Item[TObject(12)],Nil);
		Add(AxSurface1.Elements.Item[TObject(10)],AxSurface1.Elements.Item[TObject(11)],Nil);
	end;
	set_DefArrange(EXSURFACELib.DefArrangeEnum.exDefArrangeAlign,TObject(0));
	Arrange(TObject(h1));
	set_DefArrange(EXSURFACELib.DefArrangeEnum.exDefArrangeAlign,TObject(1));
	Arrange(TObject(h2));
	set_DefArrange(EXSURFACELib.DefArrangeEnum.exDefArrangeAlign,TObject(2));
	Arrange(TObject(h3));
	EndUpdate();
end
97
Is there an auto-arrange feature that will display the flow-chart centered and zoomed correctly after we are finished building it

with AxSurface1 do
begin
	with Elements do
	begin
		Add('Element A',Nil,Nil).ID := 'A';
		Add('Element B',Nil,Nil).ID := 'B';
		Add('Element C',Nil,Nil).ID := 'C';
		Add('Element D',Nil,Nil).ID := 'D';
	end;
	with Links do
	begin
		Add(AxSurface1.Elements.Item['A'],AxSurface1.Elements.Item['B'],Nil);
		Add(AxSurface1.Elements.Item['A'],AxSurface1.Elements.Item['C'],Nil);
		Add(AxSurface1.Elements.Item['B'],AxSurface1.Elements.Item['D'],Nil);
		Add(AxSurface1.Elements.Item['B'],AxSurface1.Elements.Item['C'],Nil);
	end;
	Arrange(Nil);
end
96
Is it possible to change the distance between elements, when calling the Arrange method

with AxSurface1 do
begin
	with Elements do
	begin
		Add('Element A',Nil,Nil).ID := 'A';
		Add('Element B',Nil,Nil).ID := 'B';
		Add('Element C',Nil,Nil).ID := 'C';
		Add('Element D',Nil,Nil).ID := 'D';
	end;
	with Links do
	begin
		Add(AxSurface1.Elements.Item['A'],AxSurface1.Elements.Item['B'],Nil);
		Add(AxSurface1.Elements.Item['A'],AxSurface1.Elements.Item['C'],Nil);
		Add(AxSurface1.Elements.Item['B'],AxSurface1.Elements.Item['D'],Nil);
		Add(AxSurface1.Elements.Item['B'],AxSurface1.Elements.Item['C'],Nil);
	end;
	set_DefArrange(EXSURFACELib.DefArrangeEnum.exDefArrangeDX,TObject(0));
	set_DefArrange(EXSURFACELib.DefArrangeEnum.exDefArrangeDY,TObject(0));
	Arrange(Nil);
end
95
How do I organize vertically the elements

with AxSurface1 do
begin
	with Elements do
	begin
		Add('Element A',Nil,Nil).ID := 'A';
		Add('Element B',Nil,Nil).ID := 'B';
		Add('Element C',Nil,Nil).ID := 'C';
		Add('Element D',Nil,Nil).ID := 'D';
	end;
	with Links do
	begin
		Add(AxSurface1.Elements.Item['A'],AxSurface1.Elements.Item['B'],Nil);
		Add(AxSurface1.Elements.Item['A'],AxSurface1.Elements.Item['C'],Nil);
		Add(AxSurface1.Elements.Item['B'],AxSurface1.Elements.Item['D'],Nil);
		Add(AxSurface1.Elements.Item['B'],AxSurface1.Elements.Item['C'],Nil);
	end;
	ShowLinksType := EXSURFACELib.ShowLinkTypeEnum.exLinkStraight;
	set_DefArrange(EXSURFACELib.DefArrangeEnum.exDefArrangeDir,TObject(1));
	Arrange(Nil);
end
94
Is there a way to create a link which has the same start and end element

with AxSurface1 do
begin
	with Elements do
	begin
		Add('Element',Nil,Nil);
	end;
	with Links do
	begin
		Add(AxSurface1.Elements.Item[TObject(1)],AxSurface1.Elements.Item[TObject(1)],Nil);
	end;
end
93
How can I prevent hiding the item when an item with an outgoing link, is collapsed

with AxSurface1 do
begin
	with Elements do
	begin
		Add('Item <sha ;;0>1',Nil,Nil).ID := TObject(1);
		Insert('Item <sha ;;0>2',TObject(1),Nil).ID := TObject(2);
		with Add('Item <sha ;;0>3',Nil,Nil) do
		begin
			ID := TObject(3);
			X := 96;
			Y := 23;
		end;
	end;
	with Links do
	begin
		Add(AxSurface1.Elements.Item[TObject(2)],AxSurface1.Elements.Item[TObject(3)],Nil);
	end;
	ShowLinksOnCollapse := True;
end
92
How can I change the toolbar's visual appearance

with AxSurface1 do
begin
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	set_Background(EXSURFACELib.BackgroundPartEnum.exToolBarAppearance,$1000000);
	set_Background(EXSURFACELib.BackgroundPartEnum.exToolBarBackColor,$ffffff);
	set_Background(EXSURFACELib.BackgroundPartEnum.exToolBarForeColor,$282828);
	set_Background(EXSURFACELib.BackgroundPartEnum.exToolBarButtonDownBackColor,$1606060);
	set_Background(EXSURFACELib.BackgroundPartEnum.exToolBarButtonDownForeColor,$f0f0f0);
	set_Background(EXSURFACELib.BackgroundPartEnum.exToolBarButtonHotBackColor,$1a0a0a0);
	set_Background(EXSURFACELib.BackgroundPartEnum.exToolBarButtonHotForeColor,$ffffff);
end
91
How can I change the toolbar's background color

with AxSurface1 do
begin
	set_Background(EXSURFACELib.BackgroundPartEnum.exToolBarBackColor,$ffffff);
end
90
How can I fit or ensure that all elements are in the control's client area
with AxSurface1 do
begin
	with Elements do
	begin
		Add('Element A',TObject(-500),TObject(-500)).BackColor := $ff00;
		Add('Element B',TObject(500),TObject(500)).BackColor := $ff;
		Add('Element C',TObject(48),TObject(24));
	end;
	FitToClient();
end
89
When I use the context menu to insert an image, the size seems to be fixed to 32 pixels. How can I control / change this

// CreateElement event - The user creates at runtime a new element.
procedure TWinForm1.AxSurface1_CreateElement(sender: System.Object; e: AxEXSURFACELib._ISurfaceEvents_CreateElementEvent);
begin
	// Element.Edit(0,"multiline,wordwrap")
	// Element.AutoSize = True
	with AxSurface1 do
	begin
		OutputDebugString( 'Call Edit(0) method of the Element object' );
	end
end;

// RClick event - Occurs once the user right clicks the control.
procedure TWinForm1.AxSurface1_RClick(sender: System.Object; e: System.EventArgs);
begin
	// SelElement(0).Edit(0,"multiline,wordwrap")
	with AxSurface1 do
	begin
		Selection := (get_ElementFromPoint(-1,-1) as Object);
		OutputDebugString( 'Call Edit(0) method of the SelElement(0) property' );
	end
end;

with AxSurface1 do
begin
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	VisualAppearance.Add(3,'c:\exontrol\images\hot.ebn');
	set_Background(EXSURFACELib.BackgroundPartEnum.exContextMenuAppearance,$1000000);
	set_Background(EXSURFACELib.BackgroundPartEnum.exContextMenuSelBackColor,$1fcddc0);
	set_Background(EXSURFACELib.BackgroundPartEnum.exElementBorderColor,$3000000);
	SelectObjectColor := Color.FromArgb(192,221,252);
	set_HTMLPicture('pic1','c:\exontrol\images\zipdisk.gif');
	set_HTMLPicture('pic2','c:\exontrol\images\auction.gif');
	set_HTMLPicture('pic3','c:\exontrol\images\colorize.gif');
	with Elements do
	begin
		Add('Element A',Nil,Nil).ID := 'A';
		with Add('Custom-size pictures:<br><img>pic1:24</img>,<img>pic2:48</img> ,... and so on.',TObject(96),TObject(48)) do
		begin
			ID := 'B';
			CaptionSingleLine := EXSURFACELib.CaptionSingleLineEnum.exCaptionWordWrap;
		end;
		Add('Element C',TObject(48),TObject(24));
	end;
	EditContextMenuItems := 'Size[id=57680][edittype=515][border=0][min=16][max=128][freq=16][editwidth=-128][ticklabel=value = %i ? ''<b>''+value : ( value = ' + 
	'vmax ? ''<fgcolor 808080><font ;6><b>''+value : ( value = vmin ? ''<fgcolor 808080><font ;6><b>''+value : '''' ) )],Insert[group=3](<i' + 
	'mg>pic1:32</img>[id=57763],<img>pic2:32</img>[id=57763],Others[id=1000](default[group=3](<img>pic3</img>[id=57763]),<font ;6>oth' + 
	'er sizes[sep],<img>pic3:16</img>[id=57763],<img>pic3:32</img>[id=57763],<img>pic3:64</img>[id=57763]))';
end
88
Can I add images to node while editing the node using the Edit method

// CreateElement event - The user creates at runtime a new element.
procedure TWinForm1.AxSurface1_CreateElement(sender: System.Object; e: AxEXSURFACELib._ISurfaceEvents_CreateElementEvent);
begin
	// Element.Edit(0,"multiline,wordwrap")
	// Element.AutoSize = True
	with AxSurface1 do
	begin
		OutputDebugString( 'Call Edit(0) method of the Element object' );
	end
end;

// RClick event - Occurs once the user right clicks the control.
procedure TWinForm1.AxSurface1_RClick(sender: System.Object; e: System.EventArgs);
begin
	// SelElement(0).Edit(0,"multiline,wordwrap")
	with AxSurface1 do
	begin
		Selection := (get_ElementFromPoint(-1,-1) as Object);
		OutputDebugString( 'Call Edit(0) method of the SelElement(0) property' );
	end
end;

with AxSurface1 do
begin
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	set_Background(EXSURFACELib.BackgroundPartEnum.exContextMenuAppearance,$1000000);
	set_Background(EXSURFACELib.BackgroundPartEnum.exContextMenuSelBackColor,$10000ff);
	SelectObjectStyle := EXSURFACELib.LinesStyleEnum.exNoLines;
	SelectObjectColor := Color.FromArgb(192,221,252);
	set_HTMLPicture('pic1','c:\exontrol\images\zipdisk.gif');
	set_HTMLPicture('pic2','c:\exontrol\images\auction.gif');
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	with Elements do
	begin
		Add('Element A',Nil,Nil).ID := 'A';
		with Add('This is a node that displays pictures:<br><img>pic1:48</img>,<img>pic2:48</img> ,... and so on.',TObject(96),TObject(48)) do
		begin
			ID := 'B';
			CaptionSingleLine := EXSURFACELib.CaptionSingleLineEnum.exCaptionWordWrap;
		end;
		Add('Element C',TObject(48),TObject(24)).BackColor := $ffffff;
	end;
end
87
I am using the Edit method to edit the node, but still not able to display multiple lines. Is this possible

// CreateElement event - The user creates at runtime a new element.
procedure TWinForm1.AxSurface1_CreateElement(sender: System.Object; e: AxEXSURFACELib._ISurfaceEvents_CreateElementEvent);
begin
	// Element.Edit(0,"multiline,wordwrap")
	// Element.AutoSize = True
	with AxSurface1 do
	begin
		OutputDebugString( 'Call Edit(0) method of the Element object' );
	end
end;

// RClick event - Occurs once the user right clicks the control.
procedure TWinForm1.AxSurface1_RClick(sender: System.Object; e: System.EventArgs);
begin
	// SelElement(0).Edit(0,"multiline,wordwrap")
	with AxSurface1 do
	begin
		Selection := (get_ElementFromPoint(-1,-1) as Object);
		OutputDebugString( 'Call Edit(0) method of the SelElement(0) property' );
	end
end;

with AxSurface1 do
begin
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	set_Background(EXSURFACELib.BackgroundPartEnum.exContextMenuAppearance,$1000000);
	set_Background(EXSURFACELib.BackgroundPartEnum.exContextMenuSelBackColor,$10000ff);
	SelectObjectStyle := EXSURFACELib.LinesStyleEnum.exNoLines;
	SelectObjectColor := Color.FromArgb(192,221,252);
	with Elements do
	begin
		Add('Element A',Nil,Nil).ID := 'A';
		with Add('Right-<b>Click</b> the node to edit it.',TObject(96),TObject(48)) do
		begin
			ID := 'B';
			CaptionSingleLine := EXSURFACELib.CaptionSingleLineEnum.exCaptionWordWrap;
		end;
		Add('Element C',TObject(48),TObject(24)).BackColor := $ffffff;
	end;
end
86
How can I change the visual appearance of the edit's context menu

// CreateElement event - The user creates at runtime a new element.
procedure TWinForm1.AxSurface1_CreateElement(sender: System.Object; e: AxEXSURFACELib._ISurfaceEvents_CreateElementEvent);
begin
	// Element.Edit(0)
	// Element.AutoSize = True
	with AxSurface1 do
	begin
		OutputDebugString( 'Call Edit(0) method of the Element object' );
	end
end;

// RClick event - Occurs once the user right clicks the control.
procedure TWinForm1.AxSurface1_RClick(sender: System.Object; e: System.EventArgs);
begin
	// SelElement(0).Edit(0)
	with AxSurface1 do
	begin
		Selection := (get_ElementFromPoint(-1,-1) as Object);
		OutputDebugString( 'Call Edit(0) method of the SelElement(0) property' );
	end
end;

with AxSurface1 do
begin
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	set_Background(EXSURFACELib.BackgroundPartEnum.exContextMenuAppearance,$1000000);
	set_Background(EXSURFACELib.BackgroundPartEnum.exContextMenuSelBackColor,$10000ff);
	SelectObjectStyle := EXSURFACELib.LinesStyleEnum.exNoLines;
	SelectObjectColor := Color.FromArgb(192,221,252);
	with Elements do
	begin
		Add('Element A',Nil,Nil).ID := 'A';
		Add('Right-Click to edit this node',TObject(96),TObject(48)).ID := 'B';
		Add('Element C',TObject(48),TObject(24)).BackColor := $ffffff;
	end;
end
85
How can I edit the node once the user right-click the element

// CreateElement event - The user creates at runtime a new element.
procedure TWinForm1.AxSurface1_CreateElement(sender: System.Object; e: AxEXSURFACELib._ISurfaceEvents_CreateElementEvent);
begin
	// Element.Edit(0)
	// Element.AutoSize = True
	with AxSurface1 do
	begin
		OutputDebugString( 'Call Edit(0) method of the Element object' );
	end
end;

// RClick event - Occurs once the user right clicks the control.
procedure TWinForm1.AxSurface1_RClick(sender: System.Object; e: System.EventArgs);
begin
	// SelElement(0).Edit(0)
	with AxSurface1 do
	begin
		Selection := (get_ElementFromPoint(-1,-1) as Object);
		OutputDebugString( 'Call Edit(0) method of the SelElement(0) property' );
	end
end;

with AxSurface1 do
begin
	with Elements do
	begin
		Add('Element A',Nil,Nil).ID := 'A';
		Add('Element B',TObject(96),TObject(48)).ID := 'B';
		Add('Element C',TObject(48),TObject(24)).BackColor := $ffffff;
	end;
end
84
I wish to return the name that is displayed in the Element that I have selected

// SelectionChanged event - Notifies your application that the control's selection has been changed.
procedure TWinForm1.AxSurface1_SelectionChanged(sender: System.Object; e: System.EventArgs);
begin
	with AxSurface1 do
	begin
		OutputDebugString( 'The number of selected elements is: ' );
		OutputDebugString( SelCount );
		OutputDebugString( get_SelElement(0).Caption );
	end
end;

with AxSurface1 do
begin
	HideSel := False;
	SelectObjectColorInactive := SelectObjectColor;
	SelectObjectTextColorInactive := SelectObjectTextColor;
	with Elements do
	begin
		Add('Element 1',Nil,Nil).Selected := True;
		with Add('Element 2',Nil,Nil) do
		begin
			X := 32;
			Y := 32;
		end;
	end;
end
83
Been playing with the surface control with the embedded ExGrid ActiveX...I can see most events coming through via the Surface control but I can't get the OnOLEStartDrag event to fire

// OleEvent event - Occurs once an inside control fires an event.
procedure TWinForm1.AxSurface1_OleEvent(sender: System.Object; e: AxEXSURFACELib._ISurfaceEvents_OleEventEvent);
begin
	// Ev.Param(1).Value = 2
	// Ev.Param(0).Value.SetData("items to be carried")
	with AxSurface1 do
	begin
		OutputDebugString( e.ev );
	end
end;

with AxSurface1 do
begin
	BeginUpdate();
	with Elements do
	begin
		with InsertControl('Exontrol.Grid',Nil,Nil,Nil) do
		begin
			ElementFormat := '"client"';
			with (Object as EXGRIDLib.Grid) do
			begin
				BeginUpdate();
				OLEDropMode := 1;
				Columns.Add('Default');
				Items.AddItem('Click the item so it gets the focus');
				EndUpdate();
			end;
		end;
	end;
	MoveCorner(EXSURFACELib.ContentAlignmentEnum.exMiddleCenter,EXSURFACELib.ContentAlignmentEnum.exTopLeft);
	EndUpdate();
end
82
Is it possible to assign/add a percent to an element

with AxSurface1 do
begin
	with Elements do
	begin
		with Add('Element A',Nil,Nil) do
		begin
			ID := 'A';
			CaptionAlign := EXSURFACELib.ContentAlignmentEnum.exTopCenter;
			AutoSize := False;
			Height := 36;
			Width := 96;
			MinHeight := 36;
			BackgroundExt := 'none[(2,100%-15,100%-4,14)](left[50%,back=RGB(0,255,0),text=`15%`,align=0x11,pattern=6,frame])';
			BackgroundExtValue[EXSURFACELib.IndexExtEnum.exIndexExt2,EXSURFACELib.BackgroundExtPropertyEnum.exClientExt] := '75%';
			BackgroundExtValue[EXSURFACELib.IndexExtEnum.exIndexExt2,EXSURFACELib.BackgroundExtPropertyEnum.exTextExt] := BackgroundExtValue[EXSURFACELib.IndexExtEnum.exIndexExt2,EXSURFACELib.BackgroundExtPropertyEnum.exClientExt];
		end;
	end;
end
81
How can I disable selecting the nodes/elements
with AxSurface1 do
begin
	AllowSelectObject := EXSURFACELib.AllowKeysEnum.exDisallow;
	AllowSelectNothing := False;
	AllowSelectObjectRect := EXSURFACELib.AllowKeysEnum.exDisallow;
	AllowToggleSelectKey := EXSURFACELib.AllowKeysEnum.exDisallow;
end
80
How can I set my zooming levels on the control's toolbar

with AxSurface1 do
begin
	ZoomLevels := '75,100,150,200';
	AllowLinkObjects := EXSURFACELib.AllowKeysEnum.exDisallow;
	with Elements do
	begin
		Add('Element A',Nil,Nil).ID := 'A';
		Add('Element B',TObject(96),TObject(24)).ID := 'B';
		Add('Element C',TObject(48),TObject(12)).BackColor := $ffffff;
	end;
end
79
How can I prevent zooming the surface

with AxSurface1 do
begin
	AllowZoomSurface := EXSURFACELib.AllowKeysEnum.exDisallow;
	AllowZoomWheelSurface := False;
	ToolBarFormat := '-1,100';
end
78
How can I prevent adding the links
with AxSurface1 do
begin
	AllowLinkObjects := EXSURFACELib.AllowKeysEnum.exDisallow;
	with Elements do
	begin
		Add('Element A',Nil,Nil).ID := 'A';
		Add('Element B',TObject(96),TObject(24)).ID := 'B';
		Add('Element C',TObject(48),TObject(12)).BackColor := $ffffff;
	end;
end
77
How can I fix all elements on the surface, so no moving or resizing is allowed

with AxSurface1 do
begin
	AllowResizeObject := EXSURFACELib.AllowKeysEnum.exDisallow;
	AllowMoveObject := EXSURFACELib.AllowKeysEnum.exDisallow;
	with Elements do
	begin
		Add('Element A',Nil,Nil).ID := 'A';
		Add('Element B',TObject(96),TObject(24)).ID := 'B';
		Add('Element C',TObject(48),TObject(12)).BackColor := $ffffff;
	end;
end
76
How can I link elements with no pressing the SHIFT key
with AxSurface1 do
begin
	AllowInsertObject := False;
	AllowLinkObjects := EXSURFACELib.AllowKeysEnum.exLeftClick;
	AllowMoveObject := EXSURFACELib.AllowKeysEnum.exDisallow;
	with Elements do
	begin
		Add('Element A',Nil,Nil).ID := 'A';
		Add('Element B',TObject(96),TObject(24)).ID := 'B';
		Add('Element C',TObject(48),TObject(12)).BackColor := $ffffff;
	end;
end
75
How can I disable creating the tree/hierarchies
with AxSurface1 do
begin
	AllowInsertObject := False;
	with Elements do
	begin
		Add('Element A',Nil,Nil).ID := 'A';
		Add('Element B',TObject(96),TObject(24)).ID := 'B';
		Add('Element C',TObject(48),TObject(12)).BackColor := $ffffff;
	end;
end
74
How can I create new elements using simple clicks rather than double clicks

with AxSurface1 do
begin
	AllowCreateObject := EXSURFACELib.AllowKeysEnum.exLeftClick;
end
73
How can I disable creating new elements at runtime
with AxSurface1 do
begin
	AllowCreateObject := EXSURFACELib.AllowKeysEnum.exDisallow;
end
72
I've noticed that the links cut the elements. Is it possible to show the links on the back

with AxSurface1 do
begin
	ShowLinksType := EXSURFACELib.ShowLinkTypeEnum.exLinkStraight;
	ShowLinks := EXSURFACELib.ShowExtendedLinksEnum.exShowExtendedLinks;
	with Elements do
	begin
		Add('Element A',Nil,Nil).ID := 'A';
		Add('Element B',TObject(96),TObject(24)).ID := 'B';
		Add('Element C',TObject(48),TObject(12)).BackColor := $ffffff;
	end;
	with Links do
	begin
		Add(AxSurface1.Elements.Item['A'],AxSurface1.Elements.Item['B'],Nil).Caption := 'link';
	end;
end
71
How can I show a picture on the link

with AxSurface1 do
begin
	set_HTMLPicture('pic1','c:\exontrol\images\zipdisk.gif');
	with Elements do
	begin
		Add('Element A',Nil,Nil).ID := 'A';
		Add('Element B',TObject(96),TObject(24)).ID := 'B';
	end;
	with Links do
	begin
		Add(AxSurface1.Elements.Item['A'],AxSurface1.Elements.Item['B'],Nil).Caption := '<img>pic1:24</img>';
	end;
	ShowLinksType := EXSURFACELib.ShowLinkTypeEnum.exLinkStraight;
end
70
How can I show a caption on the link

with AxSurface1 do
begin
	with Elements do
	begin
		Add('Element A',Nil,Nil).ID := 'A';
		Add('Element B',TObject(96),TObject(24)).ID := 'B';
	end;
	with Links do
	begin
		Add(AxSurface1.Elements.Item['A'],AxSurface1.Elements.Item['B'],Nil).Caption := 'link';
	end;
	ShowLinksType := EXSURFACELib.ShowLinkTypeEnum.exLinkStraight;
end
69
I am using EBN to show my arrows, the question is if I can make it bigger/larger

with AxSurface1 do
begin
	with VisualAppearance do
	begin
		Add(1,'c:\exontrol\images\normal.ebn');
		Add(2,'CP:1 -2 -2 2 2');
	end;
	with Elements do
	begin
		Add('Element A',Nil,Nil).ID := 'A';
		Add('Element B',TObject(96),TObject(24)).ID := 'B';
		Add('Element C',TObject(96),TObject(-24)).ID := 'C';
	end;
	with Links do
	begin
		Add(AxSurface1.Elements.Item['A'],AxSurface1.Elements.Item['B'],Nil);
		Add(AxSurface1.Elements.Item['A'],AxSurface1.Elements.Item['C'],Nil);
	end;
	(GetOcx() as EXSURFACELib.Surface).LinksArrowColor := $2000000;
end
68
Is it possible to show different type of arrows for links

with AxSurface1 do
begin
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	with Elements do
	begin
		Add('Element A',Nil,Nil).ID := 'A';
		Add('Element B',TObject(96),TObject(24)).ID := 'B';
		Add('Element C',TObject(96),TObject(-24)).ID := 'C';
	end;
	with Links do
	begin
		Add(AxSurface1.Elements.Item['A'],AxSurface1.Elements.Item['B'],Nil).ArrowColor := $ff;
		Add(AxSurface1.Elements.Item['A'],AxSurface1.Elements.Item['C'],Nil).ArrowColor := $1000000;
	end;
end
67
How can I remove or clear the entire surface
with AxSurface1 do
begin
	Elements.Add('element',Nil,Nil);
	Elements.Clear();
	Home();
end
66
How can I programmatically add a child element, or create a tree/hierarchy

with AxSurface1 do
begin
	with Elements do
	begin
		Add('Root',Nil,Nil).ID := 'rootID';
		Insert('Child 1','rootID',Nil);
		Insert('Child 2','rootID',Nil).ID := 'childID';
		Insert('Child 3','rootID',Nil);
		Insert('Sub-Child 1.2','childID',Nil);
		Insert('Sub-Child 2.2','childID',Nil);
	end;
end
65
I've noticed that the element's background is transparent. Can I make it opaque

with AxSurface1 do
begin
	with Elements do
	begin
		Add('new 1',Nil,Nil).BackColor := $ffffff;
		Add('new 1',TObject(24),TObject(24)).BackColor := $f0f0f0;
	end;
end
64
How can I add a resizable element
with AxSurface1 do
begin
	with Elements do
	begin
		with Add('new 1',Nil,Nil) do
		begin
			AutoSize := False;
			Resizable := True;
		end;
		with Add('new 1',TObject(24),TObject(24)) do
		begin
			AutoSize := False;
			Resizable := True;
		end;
	end;
end
63
How can I programmatically add a new element

with AxSurface1 do
begin
	with Elements do
	begin
		Add('new 1',Nil,Nil);
		Add('new 1',TObject(24),TObject(24));
	end;
end
62
Is it possible to assign a tooltip to an element

with AxSurface1 do
begin
	Elements.Add('Element with a Tooltip',Nil,Nil).ToolTip := 'This is a bit of text that should be displayed when cursor hovers the element.';
end
61
How do I specify direct/straight link for all links

with AxSurface1 do
begin
	ShowLinksType := Integer(EXSURFACELib.ShowLinkTypeEnum.exLinkStraight) Or Integer(EXSURFACELib.ShowLinkTypeEnum.exLinkDirect);
	with Elements do
	begin
		Add('Element <sha ;;0>A',Nil,Nil);
		Add('Element <sha ;;0>B',TObject(96),TObject(24));
	end;
	with Links do
	begin
		Add(AxSurface1.Elements.Item[TObject(1)],AxSurface1.Elements.Item[TObject(2)],Nil);
	end;
end
60
How do I show a direct/straight link

with AxSurface1 do
begin
	with Elements do
	begin
		Add('Element <sha ;;0>A',Nil,Nil);
		Add('Element <sha ;;0>B',TObject(96),TObject(24));
	end;
	with Links do
	begin
		Add(AxSurface1.Elements.Item[TObject(1)],AxSurface1.Elements.Item[TObject(2)],Nil).ShowLinkType := Integer(EXSURFACELib.ShowLinkTypeEnum.exLinkStraight) Or Integer(EXSURFACELib.ShowLinkTypeEnum.exLinkDirect);
	end;
end
59
How can I ensure that a specified element fits the surface's visible area

with AxSurface1 do
begin
	with Elements do
	begin
		with Add('Element A',TObject(-100),Nil).Pattern do
		begin
			Type := EXSURFACELib.PatternEnum.exPatternBDiagonal;
			Color := $e0e0e0;
		end;
		Add('Element B',TObject(2000),Nil).ScrollTo(EXSURFACELib.ContentAlignmentEnum.exMiddleCenter);
	end;
end
58
Is it possible to show a pattern like ( not available ) over an element

with AxSurface1 do
begin
	with Elements do
	begin
		with Add('Element+Pattern',TObject(-100),Nil).Pattern do
		begin
			Type := EXSURFACELib.PatternEnum.exPatternBDiagonal;
			Color := $e0e0e0;
		end;
		Add('Element',TObject(100),Nil);
	end;
end
57
How can I specify a different overview color for the element

with AxSurface1 do
begin
	with Elements do
	begin
		Add('Element+A',TObject(-100),Nil).OverviewColor := $ff;
		Add('Element+B',TObject(100),Nil);
	end;
	set_ScrollPos(True,512);
end
56
I've noticed that some lines are shown on the border, how can I get ride of them

with AxSurface1 do
begin
	with Elements do
	begin
		Add('Element+A',TObject(-100),Nil);
		Add('Element+B',TObject(100),Nil);
	end;
	set_ScrollPos(True,512);
	(GetOcx() as EXSURFACELib.Surface).OverviewColor := $ffffffff;
end
55
How can I handle clicking an icon or a picture

// HandCursorClick event - The uses clicks a part of the element that shows the had cursor.
procedure TWinForm1.AxSurface1_HandCursorClick(sender: System.Object; e: AxEXSURFACELib._ISurfaceEvents_HandCursorClickEvent);
begin
	with AxSurface1 do
	begin
		OutputDebugString( e.key );
	end
end;

with AxSurface1 do
begin
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	set_HTMLPicture('pic1','c:\exontrol\images\zipdisk.gif');
	set_HTMLPicture('pic2','c:\exontrol\images\auction.gif');
	with Elements.Add('Caption',Nil,Nil) do
	begin
		Pictures := '1,2/pic1/pic2';
		PicturesAlign := EXSURFACELib.ContentAlignmentEnum.exBottomCenter;
		ShowHandCursorOn := Integer(EXSURFACELib.ShowHandCursorOnEnum.exShowHandCursorExtraPictures) Or Integer(EXSURFACELib.ShowHandCursorOnEnum.exShowHandCursorPictures) Or Integer(EXSURFACELib.ShowHandCursorOnEnum.exShowHandCursorIcon) Or Integer(EXSURFACELib.ShowHandCursorOnEnum.exShowHandCursorPicture);
		CaptionAlign := EXSURFACELib.ContentAlignmentEnum.exTopCenter;
	end;
end
54
How can I display a picture

with AxSurface1 do
begin
	set_HTMLPicture('pic1','c:\exontrol\images\zipdisk.gif');
	set_HTMLPicture('pic2','c:\exontrol\images\auction.gif');
	Elements.Add('Element',Nil,Nil).Pictures := 'pic1/pic2';
end
53
How can I display a picture

with AxSurface1 do
begin
	set_HTMLPicture('pic1','c:\exontrol\images\zipdisk.gif');
	set_HTMLPicture('pic2','c:\exontrol\images\auction.gif');
	Elements.Add('Icon <img>pic1</img> or <img>pic2</img>',Nil,Nil);
end
52
How can I display an icon

with AxSurface1 do
begin
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	Elements.Add('Element',Nil,Nil).Pictures := '0/1,2';
end
51
How can I display an icon

with AxSurface1 do
begin
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	Elements.Add('Icon <img>1</img> or <img>2</img>',Nil,Nil);
end
50
How can I prevent moving all descendent/outgoing elements when focused element is moved, more like a free move
with AxSurface1 do
begin
	with Elements do
	begin
		Add('Element <sha ;;0>A',Nil,Nil);
		Add('Element <sha ;;0>B',TObject(96),TObject(24));
	end;
	with Links do
	begin
		Add(AxSurface1.Elements.Item[TObject(1)],AxSurface1.Elements.Item[TObject(2)],Nil);
	end;
	ShowLinksType := Integer(EXSURFACELib.ShowLinkTypeEnum.exLinkStraight) Or Integer(EXSURFACELib.ShowLinkTypeEnum.exLinkDirect);
	AllowMoveDescendents := False;
end
49
How can I display the +/- expand/collapse glyphs next to linked elements

with AxSurface1 do
begin
	with Elements do
	begin
		Add('Element <sha ;;0>A',Nil,Nil);
		Add('Element <sha ;;0>B',TObject(96),TObject(24));
	end;
	with Links do
	begin
		Add(AxSurface1.Elements.Item[TObject(1)],AxSurface1.Elements.Item[TObject(2)],Nil);
	end;
	Elements.Item[TObject(1)].Expanded := False;
	ExpandLinkedElements := True;
end
48
How can I host the Exontrol.Button inside the surface

with AxSurface1 do
begin
	with Elements do
	begin
		with Add('ActiveX',Nil,Nil) do
		begin
			Type := EXSURFACELib.ElementHostTypeEnum.exElementHostControl;
			ElementFormat := '"check":18,"client"';
			ShowCheckBox := True;
			Control := 'Exontrol.Button';
			(Object as EXBUTTONLib.Button).Caption := '<sha ;;0>button';
			Height := 32;
			Width := 128;
		end;
	end;
end
47
How can I host a Command button

with AxSurface1 do
begin
	with Elements do
	begin
		with InsertControl('Forms.CommandButton.1',Nil,Nil,Nil) do
		begin
			ElementFormat := '"check":18,"client"';
			(Object as MSForms.CommandButton2).Caption := 'command';
			ShowCheckBox := True;
			Height := 48;
			Width := 128;
		end;
	end;
end
46
How can I handle the events of the inner ActiveX control

// OleEvent event - Occurs once an inside control fires an event.
procedure TWinForm1.AxSurface1_OleEvent(sender: System.Object; e: AxEXSURFACELib._ISurfaceEvents_OleEventEvent);
begin
	with AxSurface1 do
	begin
		OutputDebugString( e.ev );
	end
end;

with AxSurface1 do
begin
	with Elements do
	begin
		with InsertControl('Forms.CommandButton.1',Nil,Nil,Nil) do
		begin
			ElementFormat := '"check":18,"client"';
			(Object as MSForms.CommandButton2).Caption := 'command';
			ShowCheckBox := True;
			Height := 48;
			Width := 128;
		end;
	end;
end
45
How can I display a checkbox while my node hosts an ActiveX inside

with AxSurface1 do
begin
	with Elements do
	begin
		with InsertControl('Forms.CommandButton.1',Nil,Nil,Nil) do
		begin
			ElementFormat := '"check":18,"client"';
			(Object as MSForms.CommandButton2).Caption := 'command';
			ShowCheckBox := True;
			Height := 48;
			Width := 128;
		end;
	end;
end
44
Is it possible to display a caption while the element hosts an ActiveX control

with AxSurface1 do
begin
	with Elements do
	begin
		with InsertControl('Forms.CommandButton.1',Nil,Nil,Nil) do
		begin
			ElementFormat := '18;"caption"/"client"';
			(Object as MSForms.CommandButton2).Caption := 'command';
			Caption := 'Forms.CommandButton';
			CaptionAlign := EXSURFACELib.ContentAlignmentEnum.exTopCenter;
			Height := 48;
			Width := 128;
		end;
	end;
end
43
I host an ActiveX control but it does not cover the whole element. What can be done

with AxSurface1 do
begin
	with Elements do
	begin
		with InsertControl('Forms.CommandButton.1',Nil,Nil,Nil) do
		begin
			ElementFormat := '"client"';
			(Object as MSForms.CommandButton2).Caption := 'command';
			Height := 32;
			Width := 128;
		end;
		with InsertControl('Forms.CommandButton.1',Nil,Nil,Nil) do
		begin
			ElementFormat := '"client"';
			(Object as MSForms.CommandButton2).Caption := 'command';
			Height := 32;
			Width := 128;
		end;
	end;
end
42
How can I host my ActiveX to the surface (method 2)

with AxSurface1 do
begin
	with Elements do
	begin
		with InsertControl('Forms.CommandButton.1',Nil,Nil,Nil) do
		begin
			ElementFormat := '"client"';
			(Object as MSForms.CommandButton2).Caption := 'command';
			Height := 32;
			Width := 128;
		end;
	end;
end
41
How can I host my ActiveX to the surface (method 1)

with AxSurface1 do
begin
	with Elements do
	begin
		with Add('ActiveX',Nil,Nil) do
		begin
			Type := EXSURFACELib.ElementHostTypeEnum.exElementHostControl;
			ElementFormat := '"client"';
			Control := 'Forms.CommandButton.1';
			(Object as MSForms.CommandButton2).Caption := 'command';
			Height := 32;
			Width := 128;
		end;
	end;
end
40
How can I define the elements with a solid color on the background

with AxSurface1 do
begin
	set_Background(EXSURFACELib.BackgroundPartEnum.exElementBorderColor,$ffffffff);
	set_Background(EXSURFACELib.BackgroundPartEnum.exElementStatusColor,$ffffffff);
	set_Background(EXSURFACELib.BackgroundPartEnum.exElementBackColor,$ff);
	with Elements do
	begin
		Add('Node A',Nil,Nil);
		Add('Node B',TObject(96),TObject(24));
	end;
end
39
Can I display the status to a different part of the element

with AxSurface1 do
begin
	Elements.Add('Node',Nil,Nil).StatusAlign := EXSURFACELib.EdgeAlignmentEnum.exAlignBottom;
end
38
How can I remove or hide the status part of the event

// AddElement event - A new element has been added to the surface.
procedure TWinForm1.AxSurface1_AddElement(sender: System.Object; e: AxEXSURFACELib._ISurfaceEvents_AddElementEvent);
begin
	// Element.StatusSize = 0
end;

with AxSurface1 do
begin
	set_Background(EXSURFACELib.BackgroundPartEnum.exElementStatusColor,$ffffffff);
	with Elements do
	begin
		Add('Node A',Nil,Nil);
		Add('Node B',TObject(96),TObject(24));
	end;
end
37
How can I change the visual appearance of the border for all elements

with AxSurface1 do
begin
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	set_Background(EXSURFACELib.BackgroundPartEnum.exElementBorderColor,$1000000);
	with Elements do
	begin
		Add('Element+A',Nil,Nil);
		Add('Element+B',TObject(96),TObject(24));
	end;
end
36
How can I change the color of the border for all elements

with AxSurface1 do
begin
	set_Background(EXSURFACELib.BackgroundPartEnum.exElementBorderColor,$ff00);
	with Elements do
	begin
		Add('Element+A',Nil,Nil);
		Add('Element+B',TObject(96),TObject(24));
	end;
end
35
How can I remove the border for all elements

with AxSurface1 do
begin
	set_Background(EXSURFACELib.BackgroundPartEnum.exElementBorderColor,$ffffffff);
	with Elements do
	begin
		Add('Element+A',Nil,Nil);
		Add('Element+B',TObject(96),TObject(24));
	end;
end
34
How do I change the visual appearance the glpyh that shows when the element is added as a child

with AxSurface1 do
begin
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	VisualAppearance.Add(2,'c:\exontrol\images\pushed.ebn');
	set_Background(EXSURFACELib.BackgroundPartEnum.exHoverInsertObject,$1000000);
	set_Background(EXSURFACELib.BackgroundPartEnum.exHoverInsertObjectGlyph,$2000000);
	with Elements do
	begin
		Add('Element <sha ;;0>A',Nil,Nil);
		Add('Element <sha ;;0>B',TObject(96),TObject(24));
	end;
end
33
Is it possible to change the color for the glpyh that shows when the element is added as a child

with AxSurface1 do
begin
	set_Background(EXSURFACELib.BackgroundPartEnum.exHoverInsertObject,$ff);
	set_Background(EXSURFACELib.BackgroundPartEnum.exHoverInsertObjectGlyph,$ff);
	with Elements do
	begin
		Add('Element <sha ;;0>A',Nil,Nil);
		Add('Element <sha ;;0>B',TObject(96),TObject(24));
	end;
end
32
How can I change the color to show a valid link

with AxSurface1 do
begin
	set_Background(EXSURFACELib.BackgroundPartEnum.exLinkObjectsValidColor,$ff00);
	with Elements do
	begin
		Add('Element <sha ;;0>A',Nil,Nil);
		Add('Element <sha ;;0>B',TObject(96),TObject(24));
	end;
end
31
How can I change the color to show an invalid link

with AxSurface1 do
begin
	set_Background(EXSURFACELib.BackgroundPartEnum.exLinkObjectsInvalidColor,$ff00);
	with Elements do
	begin
		Add('Element <sha ;;0>A',Nil,Nil);
		Add('Element <sha ;;0>B',TObject(96),TObject(24));
	end;
end
30
How can I disable adding the elements as child of other nodes
with AxSurface1 do
begin
	AllowInsertObject := False;
	with Elements do
	begin
		Add('Element <sha ;;0>A',Nil,Nil);
		Add('Element <sha ;;0>B',TObject(96),TObject(24));
	end;
end
29
How can I prevent moving the outgoing /descendents elements when moving an element
with AxSurface1 do
begin
	ShowLinksType := Integer(EXSURFACELib.ShowLinkTypeEnum.exLinkStraight) Or Integer(EXSURFACELib.ShowLinkTypeEnum.exLinkDirect);
	AllowMoveDescendents := False;
	with Elements do
	begin
		Add('Element <sha ;;0>A',Nil,Nil);
		Add('Element <sha ;;0>B',TObject(96),TObject(24));
	end;
	with Links do
	begin
		Add(AxSurface1.Elements.Item[TObject(1)],AxSurface1.Elements.Item[TObject(2)],Nil);
	end;
end
28
How can I add programatically a link

with AxSurface1 do
begin
	with Elements do
	begin
		Add('Element <sha ;;0>A',Nil,Nil);
		Add('Element <sha ;;0>B',TObject(96),TObject(24));
	end;
	with Links do
	begin
		Add(AxSurface1.Elements.Item[TObject(1)],AxSurface1.Elements.Item[TObject(2)],Nil);
	end;
end
27
How do I prevent adding a link between elements
with AxSurface1 do
begin
	AllowLinkObjects := EXSURFACELib.AllowKeysEnum.exDisallow;
	with Elements do
	begin
		Add('Element <sha ;;0>A',Nil,Nil);
		Add('Element <sha ;;0>B',TObject(96),TObject(24));
	end;
end
26
How can I hide the 100% button ( zoom ) on the control's toolbar

with AxSurface1 do
begin
	ToolBarFormat := '-1,100';
end
25
Is it possible to hide the Home button on the control's toolbar

with AxSurface1 do
begin
	ToolBarFormat := '-1,101';
end
24
How can I hide the grid lines, including the axis

with AxSurface1 do
begin
	ShowGridLines := False;
	AxisStyle := EXSURFACELib.LinesStyleEnum.exNoLines;
end
23
How can I hide the grid lines

with AxSurface1 do
begin
	ShowGridLines := False;
end
22
How can I clear the images shown on the control's toolbar

with AxSurface1 do
begin
	ToolBarReplaceIcon(TObject(0),TObject(-1));
	ToolBarRefresh();
end
21
How can I replace the default icons shown on the control's toolbar

with AxSurface1 do
begin
	ToolBarReplaceIcon(TObject(0),TObject(-1));
	ToolBarImages('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
end
20
How can I replace the default icons shown on the control's toolbar

with AxSurface1 do
begin
	ToolBarImages('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	set_ToolBarCaption(100,'<img>3</img> aka1');
end
19
How can I add an anchor element to the control's toolbar

// ToolBarAnchorClick event - Occurs when an anchor element is clicked, on the control's toolbar.
procedure TWinForm1.AxSurface1_ToolBarAnchorClick(sender: System.Object; e: AxEXSURFACELib._ISurfaceEvents_ToolBarAnchorClickEvent);
begin
	with AxSurface1 do
	begin
		OutputDebugString( e.anchorID );
	end
end;

with AxSurface1 do
begin
	ToolBarFormat := '-1,100,101,|,102';
	set_ToolBarCaption(102,'<a a1>anchor</a>');
end
18
How can I add a button/image to the control's toolbar

// ToolBarClick event - Occurs when the user clicks a button in the toolbar.
procedure TWinForm1.AxSurface1_ToolBarClick(sender: System.Object; e: AxEXSURFACELib._ISurfaceEvents_ToolBarClickEvent);
begin
	with AxSurface1 do
	begin
		OutputDebugString( e.iD );
	end
end;

with AxSurface1 do
begin
	ToolBarImages('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	ToolBarFormat := '-1,100,101,102';
	set_ToolBarCaption(102,'<img>3</img> new');
end
17
How can I add a button to the control's toolbar

// ToolBarClick event - Occurs when the user clicks a button in the toolbar.
procedure TWinForm1.AxSurface1_ToolBarClick(sender: System.Object; e: AxEXSURFACELib._ISurfaceEvents_ToolBarClickEvent);
begin
	with AxSurface1 do
	begin
		OutputDebugString( e.iD );
	end
end;

with AxSurface1 do
begin
	ToolBarFormat := '-1,100,101,102';
	set_ToolBarCaption(102,'<sha ;;0>new');
end
16
How can I hide the control's toolbar

with AxSurface1 do
begin
	ToolBarVisible := False;
end
15
How can I prevent selecting the elements
with AxSurface1 do
begin
	AllowSelectObject := EXSURFACELib.AllowKeysEnum.exDisallow;
	AllowSelectObjectRect := EXSURFACELib.AllowKeysEnum.exDisallow;
	AllowToggleSelectKey := EXSURFACELib.AllowKeysEnum.exDisallow;
	Elements.Add('element',Nil,Nil);
end
14
How can I show the selected elements the same as the control has the focus

with AxSurface1 do
begin
	HideSel := False;
	SelectObjectColorInactive := SelectObjectColor;
	SelectObjectTextColorInactive := SelectObjectTextColor;
	Elements.Add('element',Nil,Nil).Selected := True;
end
13
How can I show the selected elements with a different border

with AxSurface1 do
begin
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	HideSel := False;
	SelectObjectStyle := EXSURFACELib.LinesStyleEnum.exLinesSolid;
	(GetOcx() as EXSURFACELib.Surface).SelectObjectColor := $1000000;
	SelectObjectTextColor := Color.FromArgb(0,0,0);
	SelectObjectColorInactive := SelectObjectColor;
	SelectObjectTextColorInactive := SelectObjectTextColor;
	Elements.Add('element',Nil,Nil).Selected := True;
end
12
How can I show the selected elements with a different background color

with AxSurface1 do
begin
	HideSel := False;
	SelectObjectStyle := EXSURFACELib.LinesStyleEnum.exNoLines;
	SelectObjectColor := Color.FromArgb(255,0,0);
	SelectObjectTextColor := Color.FromArgb(255,255,255);
	SelectObjectColorInactive := SelectObjectColor;
	SelectObjectTextColorInactive := SelectObjectTextColor;
	Elements.Add('element',Nil,Nil).Selected := True;
end
11
Is it possible to add an inner control on the surface

// OleEvent event - Occurs once an inside control fires an event.
procedure TWinForm1.AxSurface1_OleEvent(sender: System.Object; e: AxEXSURFACELib._ISurfaceEvents_OleEventEvent);
begin
	with AxSurface1 do
	begin
		OutputDebugString( e.ev );
	end
end;

with AxSurface1 do
begin
	with Elements do
	begin
		with Add('activex hosting',Nil,Nil) do
		begin
			Type := EXSURFACELib.ElementHostTypeEnum.exElementHostControl;
			Control := 'Forms.CommandButton.1';
			Caption := 'Command Button';
			Height := 64;
			Width := 128;
			ElementFormat := '14;"caption"/"client"';
			CaptionAlign := EXSURFACELib.ContentAlignmentEnum.exTopCenter;
		end;
	end;
end
10
How can I make the control read-only
// LayoutStartChanging event - Occurs when the control's layout is about to be changed.
procedure TWinForm1.AxSurface1_LayoutStartChanging(sender: System.Object; e: AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEvent);
begin
	with AxSurface1 do
	begin
		OutputDebugString( e.operation );
		CancelLayoutChanging();
	end
end;

with AxSurface1 do
begin
	with Elements do
	begin
		Add('new element',Nil,Nil);
	end;
end
9
How can I handle clicking a picture on the element

// HandCursorClick event - The uses clicks a part of the element that shows the had cursor.
procedure TWinForm1.AxSurface1_HandCursorClick(sender: System.Object; e: AxEXSURFACELib._ISurfaceEvents_HandCursorClickEvent);
begin
	with AxSurface1 do
	begin
		OutputDebugString( e.key );
	end
end;

with AxSurface1 do
begin
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	with Elements do
	begin
		with Add('new element',Nil,Nil) do
		begin
			CaptionAlign := EXSURFACELib.ContentAlignmentEnum.exTopRight;
			PicturesAlign := EXSURFACELib.ContentAlignmentEnum.exTopLeft;
			ShowHandCursorOn := Integer(EXSURFACELib.ShowHandCursorOnEnum.exShowHandCursorAnchorAll) Or Integer(EXSURFACELib.ShowHandCursorOnEnum.exShowHandCursorPictures) Or Integer(EXSURFACELib.ShowHandCursorOnEnum.exShowHandCursorIcon) Or Integer(EXSURFACELib.ShowHandCursorOnEnum.exShowHandCursorPicture);
			Pictures := '0,1,2';
		end;
	end;
end
8
How can I show the hand cursor when user hovers the element's image

// HandCursorClick event - The uses clicks a part of the element that shows the had cursor.
procedure TWinForm1.AxSurface1_HandCursorClick(sender: System.Object; e: AxEXSURFACELib._ISurfaceEvents_HandCursorClickEvent);
begin
	with AxSurface1 do
	begin
		OutputDebugString( e.key );
	end
end;

with AxSurface1 do
begin
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	with Elements do
	begin
		with Add('new element',Nil,Nil) do
		begin
			CaptionAlign := EXSURFACELib.ContentAlignmentEnum.exTopRight;
			PicturesAlign := EXSURFACELib.ContentAlignmentEnum.exTopLeft;
			ShowHandCursorOn := Integer(EXSURFACELib.ShowHandCursorOnEnum.exShowHandCursorAnchorAll) Or Integer(EXSURFACELib.ShowHandCursorOnEnum.exShowHandCursorPictures) Or Integer(EXSURFACELib.ShowHandCursorOnEnum.exShowHandCursorIcon) Or Integer(EXSURFACELib.ShowHandCursorOnEnum.exShowHandCursorPicture);
			Pictures := '0,1,2';
		end;
	end;
end
7
How can I show the hand cursor when user hovers the element's checkbox

with AxSurface1 do
begin
	with Elements do
	begin
		with Add('new element',Nil,Nil) do
		begin
			CaptionAlign := EXSURFACELib.ContentAlignmentEnum.exTopRight;
			CheckBoxAlign := EXSURFACELib.ContentAlignmentEnum.exTopLeft;
			ShowCheckBox := True;
			ShowHandCursorOn := Integer(EXSURFACELib.ShowHandCursorOnEnum.exShowHandCursorAnchorAll) Or Integer(EXSURFACELib.ShowHandCursorOnEnum.exShowHandCursorCheck);
		end;
	end;
end
6
How can I remove the status part for all elements

// AddElement event - A new element has been added to the surface.
procedure TWinForm1.AxSurface1_AddElement(sender: System.Object; e: AxEXSURFACELib._ISurfaceEvents_AddElementEvent);
begin
	// Element.StatusSize = 0
end;

with AxSurface1 do
begin
	set_Background(EXSURFACELib.BackgroundPartEnum.exElementStatusColor,$ffffffff);
	Elements.Add('new element',Nil,Nil);
end
5
How can I remove the border for all elements

with AxSurface1 do
begin
	set_Background(EXSURFACELib.BackgroundPartEnum.exElementBorderColor,$ffffffff);
	Elements.Add('new element',Nil,Nil);
end
4
How do I edit the element's caption once the user creates the element

// CreateElement event - The user creates at runtime a new element.
procedure TWinForm1.AxSurface1_CreateElement(sender: System.Object; e: AxEXSURFACELib._ISurfaceEvents_CreateElementEvent);
begin
	// Element.Edit(0)
	// Element.AutoSize = True
end;


3
How can I align the element's checkbox next to the text

with AxSurface1 do
begin
	BeginUpdate();
	with Elements do
	begin
		with Add('text',Nil,Nil) do
		begin
			ShowCheckBox := True;
			CaptionAlign := EXSURFACELib.ContentAlignmentEnum.exTopRight;
			CheckBoxAlign := EXSURFACELib.ContentAlignmentEnum.exTopLeft;
		end;
	end;
	EndUpdate();
end
2
How can I assign a check-box to all elements

// AddElement event - A new element has been added to the surface.
procedure TWinForm1.AxSurface1_AddElement(sender: System.Object; e: AxEXSURFACELib._ISurfaceEvents_AddElementEvent);
begin
	// Element.ShowCheckBox = True
end;

with AxSurface1 do
begin
	BeginUpdate();
	with Elements do
	begin
		Add('',TObject(-24),TObject(-24));
		Add('',Nil,Nil).Checked := EXSURFACELib.CheckStateEnum.exChecked;
	end;
	Home();
	EndUpdate();
end
1
How do I change the control's background color

with AxSurface1 do
begin
	BackColor := Color.FromArgb(240,240,240);
end